# -*- coding:utf-8 -*-

from service.utility import encryption
import json


def create_token(**kwargs):
    return encryption.encrypt(json.dumps(kwargs))


def resolve_token(s):
    return json.loads(encryption.decrypt(s))


